package prosjekt;

/**A class that holds a row from the database table kundeinfo*/
public class KundeReg{
	private String fornavn;	
	private String etternavn;
	private String adresse;
	private int husnr;
	private String poststed;
	private int postnr;
	private String tlf;
	private int kundeid;

	
		
	public KundeReg(int kundeid, String fornavn,String etternavn, String adresse,int husnr, int postnr, String poststed, String tlf ) {
		this.kundeid = kundeid;
		this.fornavn = fornavn;
		this.etternavn = etternavn;
		this.adresse = adresse;
		this.tlf = tlf;
		this.husnr = husnr;
		this.poststed = poststed;
		this.postnr = postnr;

	}
	/**
	 * returns the costumer number of the costumer
	 * @return - int, the costumer number for the costumer
	 */
	public int getKundenr() {
		return kundeid;
	}

	/**
	 * sets the costumer number of the costumer
	 * @return - int, the costumer number for the costumer
	 */
	public void setKundenr(int kundenr) {
		this.kundeid = kundenr;
	}

	/**
	 * returns the first name of the costumer
	 * @return - String, the first name of the costumer
	 */
	public String getFornavn() {
		return fornavn;
	}
	/**
	 * returns the last name of the costumer
	 * @return - String, the last name of the costumer
	 */
	public String getEtternavn() {
		return etternavn;
	}
	/**
	 * returns the phonenumber of the costumer
	 * @return - int, the costumers phonenumber
	 */
	public String getTlfnr() {
		return tlf;
	}
	/**
	 * returns the address of the costumer
	 * @return - String, the costumer number for the costumer
	 */
	public String getAdresse() {
		return adresse;
	}
	/**
	 * returns the housenumber of the costumer
	 * @return - int, the housenumber for the costumer
	 */
	public int getHusnr() {
		return husnr;
	}
	
	public int getPostnr() {
		return postnr;
	}
	/**
	 * returns the city of the costumer
	 * @return - String, the city for the costumer
	 */	
	public String getPoststed() {
		return poststed;
	}	
	@Override
	public String toString(){
		return "Kunde ID:" + kundeid + " | fornavn:" + fornavn +
		" | etternavn:" + etternavn + "adresse:" + adresse + " | " + 
		"husnr:" + husnr + " | " + "postnr:" + postnr + " | " +" | " + 
		"poststed:" + poststed + "tlf nr:" + tlf + " | " + "\n";
	}	

}
